'''
Created on 2009-11-22

@author: wenjinjin@gmail.com
'''
from google.appengine.ext import db
from mod.tpl import Tpl
from app.userfac import UserFac

class MyFavor(Tpl):
    '''
    classdocs
    '''


    def get(self):
        member = UserFac().getUser(self)
        favors = db.GqlQuery("select * from Favorite where member = :1",member)
        blogs = []
        for favor in favors:
            blogs.append(favor.blog)
        tplval = {}
        tplval["member"] = member
        tplval["blogs"] = blogs
        tplval["returnurl"] = "/"
        self.display("index.html", tplval)